package com.mocha.bss.domain.org.repository;

import com.mocha.bss.domain.org.repository.mapper.AdmdivMapper;
import com.mocha.bss.domain.org.repository.entity.AdmdivEntity;
import org.springframework.stereotype.Repository;
import lombok.AllArgsConstructor;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 *
 * 区域信息
 *
 * @author songkui
 * @since 2025-03-24
 */
@Repository
@AllArgsConstructor
public class AdmdivRepository extends ServiceImpl<AdmdivMapper, AdmdivEntity> {

    public List<AdmdivEntity> listByPath(String path){
        return this.lambdaQuery().likeRight(AdmdivEntity::getPath, path).list();
    }

    public String[] getPaths(Long id) {
        return this.baseMapper.getPaths(id);
    }
}

